\section{fsm\+\_\+soe.\+c File Reference}
\label{fsm__soe_8c}\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}


Ether\+C\+AT SoE state machines.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{fsm__soe_8c_ab02cafd2881eb57c288e078ea57736d5}} 
\#define \textbf{ E\+C\+\_\+\+M\+B\+O\+X\+\_\+\+T\+Y\+P\+E\+\_\+\+S\+OE}~0x05
\begin{DoxyCompactList}\small\item\em Mailbox type for SoE. \end{DoxyCompactList}\item 
\mbox{\label{fsm__soe_8c_add5bad0251925ce1779bc0d3e186f547}} 
\#define \textbf{ E\+C\+\_\+\+S\+O\+E\+\_\+\+S\+I\+ZE}~0x04
\begin{DoxyCompactList}\small\item\em Size of all SoE headers. \end{DoxyCompactList}\item 
\mbox{\label{fsm__soe_8c_a2e9892fef5e41058583eafca62b7708b}} 
\#define \textbf{ E\+C\+\_\+\+S\+O\+E\+\_\+\+R\+E\+S\+P\+O\+N\+S\+E\+\_\+\+T\+I\+M\+E\+O\+UT}~1000
\begin{DoxyCompactList}\small\item\em SoE response timeout [ms]. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ ec\+\_\+soe\+\_\+opcodes} \{ \textbf{ O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST} = 0x01, 
\textbf{ O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE} = 0x02, 
\textbf{ O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST} = 0x03, 
\textbf{ O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE} = 0x04
 \}\begin{DoxyCompactList}\small\item\em SoE operations. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: R\+E\+AD S\+T\+A\+RT. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: R\+E\+AD R\+E\+Q\+U\+E\+ST. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em CoE state\+: R\+E\+AD C\+H\+E\+CK. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: R\+E\+AD R\+E\+S\+P\+O\+N\+SE. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: W\+R\+I\+TE S\+T\+A\+RT. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: W\+R\+I\+TE R\+E\+Q\+U\+E\+ST. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em CoE state\+: W\+R\+I\+TE C\+H\+E\+CK. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em SoE state\+: W\+R\+I\+TE R\+E\+S\+P\+O\+N\+SE. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+end} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em State\+: E\+ND. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+error} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em State\+: E\+R\+R\+OR. \end{DoxyCompactList}\item 
\mbox{\label{fsm__soe_8c_aac6e087c335a755f1ce0ada566734be4}} 
void \textbf{ ec\+\_\+print\+\_\+soe\+\_\+error} (const \textbf{ ec\+\_\+slave\+\_\+t} $\ast$slave, uint16\+\_\+t error\+\_\+code)
\begin{DoxyCompactList}\small\item\em Outputs an SoE error code. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+init} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+clear} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm)
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+transfer} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+slave\+\_\+t} $\ast$slave, \textbf{ ec\+\_\+soe\+\_\+request\+\_\+t} $\ast$request)
\begin{DoxyCompactList}\small\item\em Starts to transfer an I\+DN to/from a slave. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+exec} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em Executes the current state of the state machine. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+success} (const \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm)
\begin{DoxyCompactList}\small\item\em Returns, if the state machine terminated with success. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm)
\begin{DoxyCompactList}\small\item\em Output information about a failed SoE transfer. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em Prepare a read operation. \end{DoxyCompactList}\item 
void \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment} (\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$fsm, \textbf{ ec\+\_\+datagram\+\_\+t} $\ast$datagram)
\begin{DoxyCompactList}\small\item\em Write next fragment. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{fsm__soe_8c_a4013ee44d8165e19ed7abec334d499e4}} 
const \textbf{ ec\+\_\+code\+\_\+msg\+\_\+t} \textbf{ soe\+\_\+error\+\_\+codes} [$\,$]
\begin{DoxyCompactList}\small\item\em SoE error codes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT SoE state machines. 



\subsection{Enumeration Type Documentation}
\mbox{\label{fsm__soe_8c_a9c7163e5550adaf891eb9afff86b72cd}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+soe\+\_\+opcodes@{ec\+\_\+soe\+\_\+opcodes}}
\index{ec\+\_\+soe\+\_\+opcodes@{ec\+\_\+soe\+\_\+opcodes}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+soe\+\_\+opcodes}
{\footnotesize\ttfamily enum \textbf{ ec\+\_\+soe\+\_\+opcodes}}



SoE operations. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST@{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST@{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST}}}\mbox{\label{fsm__soe_8c_a9c7163e5550adaf891eb9afff86b72cda914c75cac48096f5ee9befec8bcf4160}} 
O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+Q\+U\+E\+ST&Read request. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE@{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE@{O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE}}}\mbox{\label{fsm__soe_8c_a9c7163e5550adaf891eb9afff86b72cda7b5653448be7413e965de6318740afdc}} 
O\+P\+C\+O\+D\+E\+\_\+\+R\+E\+A\+D\+\_\+\+R\+E\+S\+P\+O\+N\+SE&Read response. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST@{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST@{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST}}}\mbox{\label{fsm__soe_8c_a9c7163e5550adaf891eb9afff86b72cda1b5afa15a9b8a6f640ea4307ab399901}} 
O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+Q\+U\+E\+ST&Write request. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE@{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE@{O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE}}}\mbox{\label{fsm__soe_8c_a9c7163e5550adaf891eb9afff86b72cdacc60027a463033de1a3f6a2ac52a4f0f}} 
O\+P\+C\+O\+D\+E\+\_\+\+W\+R\+I\+T\+E\+\_\+\+R\+E\+S\+P\+O\+N\+SE&Write response. \\
\hline

\end{DoxyEnumFields}


Definition at line 50 of file fsm\+\_\+soe.\+c.



\subsection{Function Documentation}
\mbox{\label{fsm__soe_8c_a490a68315f4cc326d48ebfd5b051b78f}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+start (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: R\+E\+AD S\+T\+A\+RT. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 254 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_ab34704de6495b549ad53ca84a80e22ea}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+request (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: R\+E\+AD R\+E\+Q\+U\+E\+ST. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 285 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a428b4a4e8318c83eaa4ecd287caf9e61}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+check (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



CoE state\+: R\+E\+AD C\+H\+E\+CK. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 340 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_af87a35609040b73b496b8c1ec9a3aa74}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response@{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+read\+\_\+response (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: R\+E\+AD R\+E\+S\+P\+O\+N\+SE. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 396 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a187c0a9191a7f9755bbe63f72af7088d}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+start (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: W\+R\+I\+TE S\+T\+A\+RT. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 579 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a2ce6509b41b05ad9e20d1f8293c20794}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+request (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: W\+R\+I\+TE R\+E\+Q\+U\+E\+ST. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 606 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a74542a08c62d78d7179e6b6d36302e10}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+check (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



CoE state\+: W\+R\+I\+TE C\+H\+E\+CK. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 656 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a7f9f8b5cc1b3d0128484df9a512a7b2f}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+response (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



SoE state\+: W\+R\+I\+TE R\+E\+S\+P\+O\+N\+SE. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 710 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a3c6a2f5c73f2e7e47f9fd50055a3722f}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+end@{ec\+\_\+fsm\+\_\+soe\+\_\+end}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+end@{ec\+\_\+fsm\+\_\+soe\+\_\+end}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+end()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+end (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



State\+: E\+ND. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 837 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a8e0e1784416c0baa0a9d9d69efc781bd}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+error@{ec\+\_\+fsm\+\_\+soe\+\_\+error}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+error@{ec\+\_\+fsm\+\_\+soe\+\_\+error}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+error()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+error (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



State\+: E\+R\+R\+OR. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 826 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a22bcbd5d8832e375e3cb5ce0b960da5d}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+init@{ec\+\_\+fsm\+\_\+soe\+\_\+init}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+init@{ec\+\_\+fsm\+\_\+soe\+\_\+init}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+init()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+init (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm }\end{DoxyParamCaption})}



Constructor. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
\end{DoxyParams}


Definition at line 107 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a422dd4f9c47393097303ca25a7d17dbf}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+clear@{ec\+\_\+fsm\+\_\+soe\+\_\+clear}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+clear@{ec\+\_\+fsm\+\_\+soe\+\_\+clear}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+clear()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+clear (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm }\end{DoxyParamCaption})}



Destructor. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
\end{DoxyParams}


Definition at line 120 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a34c4cc4d7d8988a5786599d07d52aebd}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+transfer@{ec\+\_\+fsm\+\_\+soe\+\_\+transfer}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+transfer@{ec\+\_\+fsm\+\_\+soe\+\_\+transfer}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+transfer()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+transfer (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+slave\+\_\+t} $\ast$}]{slave,  }\item[{\textbf{ ec\+\_\+soe\+\_\+request\+\_\+t} $\ast$}]{request }\end{DoxyParamCaption})}



Starts to transfer an I\+DN to/from a slave. 


\begin{DoxyParams}{Parameters}
{\em fsm} & State machine. \\
\hline
{\em slave} & Ether\+C\+AT slave. \\
\hline
{\em request} & SoE request. \\
\hline
\end{DoxyParams}


Definition at line 130 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a2572aecb3869697ac939f78e22c3cd4e}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+exec@{ec\+\_\+fsm\+\_\+soe\+\_\+exec}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+exec@{ec\+\_\+fsm\+\_\+soe\+\_\+exec}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+exec()}
{\footnotesize\ttfamily int ec\+\_\+fsm\+\_\+soe\+\_\+exec (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



Executes the current state of the state machine. 

\begin{DoxyReturn}{Returns}
1 if the datagram was used, else 0. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 152 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_abe5fc037034ee0591047a678d3d52e36}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+success@{ec\+\_\+fsm\+\_\+soe\+\_\+success}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+success@{ec\+\_\+fsm\+\_\+soe\+\_\+success}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+success()}
{\footnotesize\ttfamily int ec\+\_\+fsm\+\_\+soe\+\_\+success (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm }\end{DoxyParamCaption})}



Returns, if the state machine terminated with success. 

\begin{DoxyReturn}{Returns}
non-\/zero if successful. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em fsm} & Finite state machine \\
\hline
\end{DoxyParams}


Definition at line 187 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a5cdb42cd4bfb8be6cb51e950c3a1e730}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error@{ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error@{ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+print\+\_\+error (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm }\end{DoxyParamCaption})}



Output information about a failed SoE transfer. 


\begin{DoxyParams}{Parameters}
{\em fsm} & Finite state machine \\
\hline
\end{DoxyParams}


Definition at line 196 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_a6cebae49a5e2fddc1d4eacd82a2f04df}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read@{ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read@{ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read()}
{\footnotesize\ttfamily int ec\+\_\+fsm\+\_\+soe\+\_\+prepare\+\_\+read (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



Prepare a read operation. 

\begin{DoxyReturn}{Returns}
0 on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 219 of file fsm\+\_\+soe.\+c.

\mbox{\label{fsm__soe_8c_aac4bf11d75a4045679fcc2bc4cd2b9f3}} 
\index{fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}!ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment}}
\index{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment@{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment}!fsm\+\_\+soe.\+c@{fsm\+\_\+soe.\+c}}
\subsubsection{ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment()}
{\footnotesize\ttfamily void ec\+\_\+fsm\+\_\+soe\+\_\+write\+\_\+next\+\_\+fragment (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+fsm\+\_\+soe\+\_\+t} $\ast$}]{fsm,  }\item[{\textbf{ ec\+\_\+datagram\+\_\+t} $\ast$}]{datagram }\end{DoxyParamCaption})}



Write next fragment. 


\begin{DoxyParams}{Parameters}
{\em fsm} & finite state machine \\
\hline
{\em datagram} & Datagram to use. \\
\hline
\end{DoxyParams}


Definition at line 522 of file fsm\+\_\+soe.\+c.

